package com.cifz.reducerdemo

import android.util.Log
import com.redux.core.Action

fun appReducer(action : Action, state : AppState?) : AppState{
    var state = state ?: AppState()
    when(action){
        is TestOneAction -> {
            Log.d(Constant.TAG, "appReducer 收到了消息 : ${action.content}")
            state = state.copy(content = action.content)
        }
    }
    return state
}